package com.unionpay.mpds.model;

// default package

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * Shop entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "T_SHOP", uniqueConstraints = @UniqueConstraint(columnNames = "SHOP_NO"))
public class Shop implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = 8210149982557747396L;
	private String branchNo;
	private String instNo;
	private String shopNo;
	private String shopNoP;
	private String shopName;
	private String shopEname;
	private Integer adNo;
	private String shopLatitude;
	private String shopLongitude;
	private String shopMob;
	private String shopEmail;
	private String shopWeb;
	private String shopZip;
	private String shopAddress;
	private String shopStatus;
	private String shopLevel;
	private String shopMcc;
	private String shopCreateTime;

	// Constructors

	/** default constructor */
	public Shop() {
	}

	/** minimal constructor */
	public Shop(String branchNo, String instNo, String shopNo, String shopNoP,
			String shopName, String shopEname, Integer adNo,
			String shopStatus, String shopLevel, String shopMcc) {
		this.branchNo = branchNo;
		this.instNo = instNo;
		this.shopNo = shopNo;
		this.shopNoP = shopNoP;
		this.shopName = shopName;
		this.shopEname = shopEname;
		this.adNo = adNo;
		this.shopStatus = shopStatus;
		this.shopLevel = shopLevel;
		this.shopMcc = shopMcc;
	}

	/** full constructor */
	public Shop(String branchNo, String instNo, String shopNo, String shopNoP,
			String shopName, String shopEname, Integer adNo,
			String shopLatitude, String shopLongitude, String shopMob,
			String shopEmail, String shopWeb, String shopZip,
			String shopAddress, String shopStatus, String shopLevel,
			String shopMcc, String shopCreateTime) {
		this.branchNo = branchNo;
		this.instNo = instNo;
		this.shopNo = shopNo;
		this.shopNoP = shopNoP;
		this.shopName = shopName;
		this.shopEname = shopEname;
		this.adNo = adNo;
		this.shopLatitude = shopLatitude;
		this.shopLongitude = shopLongitude;
		this.shopMob = shopMob;
		this.shopEmail = shopEmail;
		this.shopWeb = shopWeb;
		this.shopZip = shopZip;
		this.shopAddress = shopAddress;
		this.shopStatus = shopStatus;
		this.shopLevel = shopLevel;
		this.shopMcc = shopMcc;
		this.shopCreateTime = shopCreateTime;
	}

	// Property accessors

	@Column(name = "BRANCH_NO", nullable = false, length = 15)
	public String getBranchNo() {
		return this.branchNo;
	}

	public void setBranchNo(String branchNo) {
		this.branchNo = branchNo;
	}

	@Column(name = "INST_NO", nullable = false, length = 15)
	public String getInstNo() {
		return this.instNo;
	}

	public void setInstNo(String instNo) {
		this.instNo = instNo;
	}

	@Id
	@Column(name = "SHOP_NO", unique = true, nullable = false, length = 15)
	public String getShopNo() {
		return this.shopNo;
	}

	public void setShopNo(String shopNo) {
		this.shopNo = shopNo;
	}

	@Column(name = "SHOP_NO_P", nullable = false, length = 15)
	public String getShopNoP() {
		return this.shopNoP;
	}

	public void setShopNoP(String shopNoP) {
		this.shopNoP = shopNoP;
	}

	@Column(name = "SHOP_NAME", nullable = false, length = 40)
	public String getShopName() {
		return this.shopName;
	}

	public void setShopName(String shopName) {
		this.shopName = shopName;
	}

	@Column(name = "SHOP_ENAME", nullable = false, length = 40)
	public String getShopEname() {
		return this.shopEname;
	}

	public void setShopEname(String shopEname) {
		this.shopEname = shopEname;
	}

	@Column(name = "AD_NO", nullable = false)
	public Integer getAdNo() {
		return this.adNo;
	}

	public void setAdNo(Integer adNo) {
		this.adNo = adNo;
	}

	@Column(name = "SHOP_LATITUDE", length = 10)
	public String getShopLatitude() {
		return this.shopLatitude;
	}

	public void setShopLatitude(String shopLatitude) {
		this.shopLatitude = shopLatitude;
	}

	@Column(name = "SHOP_LONGITUDE", length = 10)
	public String getShopLongitude() {
		return this.shopLongitude;
	}

	public void setShopLongitude(String shopLongitude) {
		this.shopLongitude = shopLongitude;
	}

	@Column(name = "SHOP_MOB", length = 15)
	public String getShopMob() {
		return this.shopMob;
	}

	public void setShopMob(String shopMob) {
		this.shopMob = shopMob;
	}

	@Column(name = "SHOP_EMAIL", length = 40)
	public String getShopEmail() {
		return this.shopEmail;
	}

	public void setShopEmail(String shopEmail) {
		this.shopEmail = shopEmail;
	}

	@Column(name = "SHOP_WEB", length = 40)
	public String getShopWeb() {
		return this.shopWeb;
	}

	public void setShopWeb(String shopWeb) {
		this.shopWeb = shopWeb;
	}

	@Column(name = "SHOP_ZIP", length = 6)
	public String getShopZip() {
		return this.shopZip;
	}

	public void setShopZip(String shopZip) {
		this.shopZip = shopZip;
	}

	@Column(name = "SHOP_ADDRESS", length = 80)
	public String getShopAddress() {
		return this.shopAddress;
	}

	public void setShopAddress(String shopAddress) {
		this.shopAddress = shopAddress;
	}

	@Column(name = "SHOP_STATUS", nullable = false, length = 1)
	public String getShopStatus() {
		return this.shopStatus;
	}

	public void setShopStatus(String shopStatus) {
		this.shopStatus = shopStatus;
	}

	@Column(name = "SHOP_LEVEL", nullable = false, length = 1)
	public String getShopLevel() {
		return this.shopLevel;
	}

	public void setShopLevel(String shopLevel) {
		this.shopLevel = shopLevel;
	}

	@Column(name = "SHOP_MCC", nullable = false, length = 4)
	public String getShopMcc() {
		return this.shopMcc;
	}

	public void setShopMcc(String shopMcc) {
		this.shopMcc = shopMcc;
	}
	
	@Column(name = "SHOP_CREATETIME", length = 8)
	public String getShopCreateTime() {
		return this.shopCreateTime;
	}

	public void setShopCreateTime(String shopCreateTime) {
		this.shopCreateTime = shopCreateTime;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof Shop))
			return false;
		Shop castOther = (Shop) other;

		return ((this.getBranchNo() == castOther.getBranchNo()) || (this
				.getBranchNo() != null && castOther.getBranchNo() != null && this
				.getBranchNo().equals(castOther.getBranchNo())))
				&& ((this.getInstNo() == castOther.getInstNo()) || (this
						.getInstNo() != null && castOther.getInstNo() != null && this
						.getInstNo().equals(castOther.getInstNo())))
				&& ((this.getShopNo() == castOther.getShopNo()) || (this
						.getShopNo() != null && castOther.getShopNo() != null && this
						.getShopNo().equals(castOther.getShopNo())))
				&& ((this.getShopNoP() == castOther.getShopNoP()) || (this
						.getShopNoP() != null && castOther.getShopNoP() != null && this
						.getShopNoP().equals(castOther.getShopNoP())))
				&& ((this.getShopName() == castOther.getShopName()) || (this
						.getShopName() != null
						&& castOther.getShopName() != null && this
						.getShopName().equals(castOther.getShopName())))
				&& ((this.getShopEname() == castOther.getShopEname()) || (this
						.getShopEname() != null
						&& castOther.getShopEname() != null && this
						.getShopEname().equals(castOther.getShopEname())))
				&& ((this.getAdNo() == castOther.getAdNo()) || (this.getAdNo() != null
						&& castOther.getAdNo() != null && this.getAdNo()
						.equals(castOther.getAdNo())))
				&& ((this.getShopLatitude() == castOther.getShopLatitude()) || (this
						.getShopLatitude() != null
						&& castOther.getShopLatitude() != null && this
						.getShopLatitude().equals(castOther.getShopLatitude())))
				&& ((this.getShopLongitude() == castOther.getShopLongitude()) || (this
						.getShopLongitude() != null
						&& castOther.getShopLongitude() != null && this
						.getShopLongitude()
						.equals(castOther.getShopLongitude())))
				&& ((this.getShopMob() == castOther.getShopMob()) || (this
						.getShopMob() != null && castOther.getShopMob() != null && this
						.getShopMob().equals(castOther.getShopMob())))
				&& ((this.getShopEmail() == castOther.getShopEmail()) || (this
						.getShopEmail() != null
						&& castOther.getShopEmail() != null && this
						.getShopEmail().equals(castOther.getShopEmail())))
				&& ((this.getShopWeb() == castOther.getShopWeb()) || (this
						.getShopWeb() != null && castOther.getShopWeb() != null && this
						.getShopWeb().equals(castOther.getShopWeb())))
				&& ((this.getShopZip() == castOther.getShopZip()) || (this
						.getShopZip() != null && castOther.getShopZip() != null && this
						.getShopZip().equals(castOther.getShopZip())))
				&& ((this.getShopAddress() == castOther.getShopAddress()) || (this
						.getShopAddress() != null
						&& castOther.getShopAddress() != null && this
						.getShopAddress().equals(castOther.getShopAddress())))
				&& ((this.getShopStatus() == castOther.getShopStatus()) || (this
						.getShopStatus() != null
						&& castOther.getShopStatus() != null && this
						.getShopStatus().equals(castOther.getShopStatus())))
				&& ((this.getShopLevel() == castOther.getShopLevel()) || (this
						.getShopLevel() != null
						&& castOther.getShopLevel() != null && this
						.getShopLevel().equals(castOther.getShopLevel())))
				&& ((this.getShopMcc() == castOther.getShopMcc()) || (this
						.getShopMcc() != null && castOther.getShopMcc() != null && this
						.getShopMcc().equals(castOther.getShopMcc())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getBranchNo() == null ? 0 : this.getBranchNo().hashCode());
		result = 37 * result
				+ (getInstNo() == null ? 0 : this.getInstNo().hashCode());
		result = 37 * result
				+ (getShopNo() == null ? 0 : this.getShopNo().hashCode());
		result = 37 * result
				+ (getShopNoP() == null ? 0 : this.getShopNoP().hashCode());
		result = 37 * result
				+ (getShopName() == null ? 0 : this.getShopName().hashCode());
		result = 37 * result
				+ (getShopEname() == null ? 0 : this.getShopEname().hashCode());
		result = 37 * result
				+ (getAdNo() == null ? 0 : this.getAdNo().hashCode());
		result = 37
				* result
				+ (getShopLatitude() == null ? 0 : this.getShopLatitude()
						.hashCode());
		result = 37
				* result
				+ (getShopLongitude() == null ? 0 : this.getShopLongitude()
						.hashCode());
		result = 37 * result
				+ (getShopMob() == null ? 0 : this.getShopMob().hashCode());
		result = 37 * result
				+ (getShopEmail() == null ? 0 : this.getShopEmail().hashCode());
		result = 37 * result
				+ (getShopWeb() == null ? 0 : this.getShopWeb().hashCode());
		result = 37 * result
				+ (getShopZip() == null ? 0 : this.getShopZip().hashCode());
		result = 37
				* result
				+ (getShopAddress() == null ? 0 : this.getShopAddress()
						.hashCode());
		result = 37
				* result
				+ (getShopStatus() == null ? 0 : this.getShopStatus()
						.hashCode());
		result = 37 * result
				+ (getShopLevel() == null ? 0 : this.getShopLevel().hashCode());
		result = 37 * result
				+ (getShopMcc() == null ? 0 : this.getShopMcc().hashCode());
		return result;
	}

}